package ooday03;

public class InterfaceDemo {
    public static void main(String[] args) {
        //Inter3 inter3 = new  inter3(); //编译错误 接口不能被实例化
    }
}


interface Inter {
    public abstract void show(); //完整写法

    void sayHi(); //默认public abstract
    //void say(){} //编译错误，抽象方法不能有方法体
}

interface Inter1 extends Inter {
    void show();

    void test();
}

class Aoo implements Inter1 {
    @Override
    public void show() { //重写接口中的方法时，必须加public
    }
    @Override
    public void test() {
    }
    @Override
    public void sayHi() {
    }
}






//演示接口多实现
interface Inter2{
    void show();
}
interface Inter3{
    void test();
}
abstract class Boo{
    abstract void say();
}
class Coo extends Boo implements Inter2,Inter3{
    public void show(){}
    public void test(){}
    void say(){}
}






